import request from '@/utils/request'

// 合同列表
export function listContract(query) {
  return request({
    url: '/supervise/proContractApi/list',
    method: 'post',
    params: query
  })
}

// 删除合同
export function deleteContract(id) {
  return request({
    url: '/supervise/proContractApi/remove',
    method: 'post',
    params: { id }
  })
}

// 新增合同
export function addContract(data) {
  return request({
    url: '/supervise/proContractApi/add',
    method: 'post',
    data: data
  })
}

// 更新合同
export function updateContract(data) {
  return request({
    url: '/supervise/proContractApi/update',
    method: 'post',
    data: data
  })
}

// 合同详情
export function getContractById(id) {
  return request({
    url: '/supervise/proContractApi/get/' + id
  })
}

// 查看变更记录
export function detailContract(id) {
  return request({
    url: '/supervise/proContractApi/getPlus/' + id
  })
}
